package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * 仓库信息表
 *
 * @author wy
 * @since 2024-07-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("warehouse")
@ApiModel("仓库信息表")
public class Warehouse implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "物资仓库id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "仓库名称")
    private String name;

    @ApiModelProperty(value = "仓库地址")
    private String address;

    @ApiModelProperty(value = "仓库状态")
    private Integer status;

    @ApiModelProperty(value = "负责人id")
    private Integer userId;

    @TableField(exist = false)
    private String userName;

    @ApiModelProperty(value = "是否删除 0：未删除；1：已删除")
    private Integer isDeleted;

    @ApiModelProperty(value = "乐观锁字段")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;

    @TableField(exist = false)
    private List<Material> materials;

}
